<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>PLPM IoTDB 数据管理系统</title>

    <!-- Vue.js 本地版本 -->
    <script src="libs/vue.global.js"></script>

    <!-- Element Plus UI 组件库 本地版本 -->
    <link rel="stylesheet" href="libs/index.css" />
    <script src="libs/index.full.js"></script>

    <!-- Axios HTTP 客户端 本地版本 -->
    <script src="libs/axios.min.js"></script>

    <!-- Spark MD5 库 用于文件分片上传 -->
    <script src="libs/spark-md5.min.js"></script>

    <!-- 自定义样式 -->
    <link rel="stylesheet" href="css/app.css" />
    <link rel="stylesheet" href="css/modal.css" />
  </head>
  <body>
    <div id="app">
      <div class="container">
        <!-- 文件上传组件 -->
        <file-upload
          @files-selected="handleFilesSelected"
          @upload-success="handleUploadSuccess"
          @upload-error="handleUploadError"
        ></file-upload>

        <!-- 主要内容区域 -->
        <div class="main-content">
          <!-- 文件列表组件 -->
          <file-list
            :file-list="fileList"
            :select-all="selectAll"
            :current-page="currentPage"
            :page-size="pageSize"
            :total-files="totalFiles"
            :current-tab="currentTab"
            @toggle-select-all="toggleSelectAll"
            @update-select-all="updateSelectAll"
            @batch-modify="batchModify"
            @batch-import="batchImport"
            @import-file="importFile"
            @show-tag-info="showTagInfo"
            @change-page="changePage"
            @change-page-size="changePageSize"
            @tab-change="handleTabChange"
            @clear-selections="clearSelections"
            @show-import-progress="showImportProgress"
            @import-success="handleImportSuccess"
            @import-error="handleImportError"
          >
          </file-list>
        </div>
      </div>

      <!-- 标签信息弹窗组件 -->
      <tag-info-modal
        :show="showModal"
        :title="modalTitle"
        :form-data="formData"
        :is-edit-mode="isEditMode"
        :is-batch-mode="isBatchMode"
        :selected-files="selectedFiles"
        @close="closeModal"
        @save="saveTagInfo"
      >
      </tag-info-modal>
    </div>

    <!-- 组件脚本 -->
    <script src="js/components/FileUpload.js"></script>
    <script src="js/components/FileList.js"></script>
    <script src="js/components/TagInfoModal.js"></script>

    <!-- 主应用脚本 -->
    <script src="js/app.js"></script>
  </body>
</html>
